package mobilizator.app.creations;

import mobilizator.app.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;

public class CreateCreationActivity extends Activity implements OnClickListener {
	private TextView title;
	
	private Button addCreationBtn, backBtn;

	private Button head, torso, legs, feet, extras;

	private Spinner creationsSpinner;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.creation);
		
		// TODO Ogarnąć layout
		/*title = (TextView) findViewById(R.id.header_title);
		title.setText("Dobierz ubiór");*/

		getWindow().setSoftInputMode(
				WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);

		creationsSpinner = (Spinner) findViewById(R.id.spinner1);

		addCreationBtn = (Button) findViewById(R.id.remember_creation);
		addCreationBtn.setOnClickListener(this);

		backBtn = (Button) findViewById(R.id.back_button);
		backBtn.setOnClickListener(this);

		head = (Button) findViewById(R.id.change1);
		head.setOnClickListener(this);

		torso = (Button) findViewById(R.id.change2);
		torso.setOnClickListener(this);

		legs = (Button) findViewById(R.id.change3);
		legs.setOnClickListener(this);

		feet = (Button) findViewById(R.id.change4);
		feet.setOnClickListener(this);

		extras = (Button) findViewById(R.id.change5);
		extras.setOnClickListener(this);

	}

	public void onClick(View v) {
		int id = v.getId();

		switch (id) {
		case R.id.remember_creation:
			Toast.makeText(this, "Kreację zapisano w szafie!",
					Toast.LENGTH_SHORT).show();
			break;
		case R.id.back_button:
			finish();
			break;
		case R.id.change1:
			Toast.makeText(this, "Zmien element noszone na glowie!",
					Toast.LENGTH_SHORT).show();

			break;
		case R.id.change2:
			break;
		case R.id.change3:
			break;
		case R.id.change4:
			break;
		case R.id.change5:
			break;

		default:
			break;
		}
	}
}
